/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.mach.service;

import org.apache.ibatis.annotations.Param;
import org.springblade.mach.entity.DrawingInfo;
import org.springblade.mach.vo.DrawingInfoVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.modules.system.vo.MenuVO;

import java.util.List;
import java.util.Map;

/**
 *  服务类
 *
 * @author LY
 * @since 2021-03-05
 */
public interface IDrawingInfoService extends BaseService<DrawingInfo> {

	List<DrawingInfoVO> getChileNodeByPId(Long pid);

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param drawingInfo
	 * @return
	 */
	IPage<DrawingInfoVO> selectDrawingInfoPage(IPage<DrawingInfoVO> page, DrawingInfo drawingInfo);



	List<DrawingInfoVO> lazyList(Long parentId, Map<String, Object> param);

	List<DrawingInfoVO> tree();

	List<DrawingInfoVO> getList(Map<String,Object>  drawingInfo);
	DrawingInfoVO getDrawingInfoByNodeId(Long nodeId);

	DrawingInfo getDrawingInfoByDrawingNumber(String drawingNumber);

	List<DrawingInfoVO> lazyTree(Long parentCode, Long id);

	List<DrawingInfoVO> getTreeList(@Param("drawingInfo") DrawingInfo drawingInfo);

	/**
	 * 获取bom详情
	 * @param drawingNumber
	 * @param drawingName
	 * @return
	 */
	DrawingInfo getDrawingInfo(String drawingNumber, String drawingName);

	/**
	 * 获取父层级的bom信息
	 * @param subDrawingNumber
	 * @return
	 */
	List<DrawingInfo> findParentDrawingInfoList(String subDrawingNumber);

	/**
	 * 获取所有的展开的子级节点的信息
	 */
	List<DrawingInfo> findChildDrawingInfoList(Long parentId);

}
